package com.mh.study.jackson.annotations;

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;

/**
 * 使用@JsonIgnoreProperties或者@JsonIgnore都可以忽略属性
 * @author meng.han
 * @since 2021-11-26
 */
//@JsonIgnoreProperties({ "id" })
public class BeanWithIgnore {
    @JsonIgnore
    public int id;
    public String name;

    public BeanWithIgnore() {
    }

    public BeanWithIgnore(int id, String name) {
        this.id = id;
        this.name = name;
    }
}
